/**
 * Created by Administrator on 2016/11/16.
 */


<!--页面加载时行成表单验证对象-->
$("#login").validate({
    rules:{
        user_id:{ required:true, maxlength:10,},
        password:{required:true,maxlength:15,},
        authCode:{required:true,checkCode:true}
    },
    messages:{
        user_id:{required:"用户名不能为空 ", maxlength:"用户名10个字符以下"},
        password:{required:"密码不能为空", maxlength:"密码在15个字符以下"},
        authCode:{required:"验证码不能为空"}
    }
});
$("#register").validate({
    rules:{
        user_id:{ required:true, minlength: 2,maxlength:10,},
        password:{required:true,minlength: 6,maxlength:15,},
        authCode:{required:true,checkCode:true},
        nick:{required:true, minlength: 2,maxlength:10,},
        school:{required:true, minlength:4,maxlength:12,},
        email:{required: true,email: true}
    },
    messages:{
        user_id:{required:"用户名不能为空 " ,minlength: "用户名必须有2个字符以上",maxlength:"用户名在10个字符之内"},
        password:{required:"密码不能为空" ,minlength: "密码必须由6个字符以上组成",maxlength:"密码在15个字符之内"},
        authCode:{required:"验证码不能为空"},
        nick:{required:"昵称不能为空", minlength: "昵称必须由2个字符以上组成",maxlength:"昵称在15个字符之内",},
        school:{required:"密码不能为空" ,minlength: "校名必须由4个字符以上组成",maxlength:"校名在12个字符之内"},
        email:{required: "请输入一个正确的邮箱",}
    }
});
